package com.prj.ufdm.cloud.svr.gateway.constant;

/**
  *  安全相关常量
 * @author Administrator
 *
 */
public class WebSecurityConstants {
	
	// 用户登录验证Token属性
	public static final String AUTH_USER_TOKEN = "Auth-User-Token";
	// 用户ID
	public static final String AUTH_USER_ID = "Auth-User-Id";
	// 用户登录名称
	public static final String AUTH_USER_NAME = "Auth-User-Name";
	// 用户真实名称
	public static final String AUTH_REAL_NAME = "Auth-Real-Name";
	// 机构ID
	public static final String AUTH_USER_ORGAN_ID = "Auth-User-OrganId";
	// 机构编码
	public static final String AUTH_USER_ORGAN_CODE = "Auth-User-OrganCode";
	// 授权机构ID
	public static final String AUTH_USER_GRANT_ORGAN_IDS = "Auth-User-GrantOrganIds";
	
	
	// 默认TOKEN有效时长（分钟数）
	public static int TOKEN_VALID_MINUTES = 120;
	// 默认允许访问URL
	public static String AUTH_ALLLOW_URL = "/,/index.html,/index.htm,/favicon.ico,/static/**,/image/**,/css/**,/js/**,/websocket/**,/health,/web/sysuser/login";
	// 是否启动REDIS
	public static boolean REDIS_ENABLED = true;
	// token 对应用户信息
	public static String REDIS_MAP_KEY_TOKEN_USERINFO = "user:token:userinfo";
	// 用户ID，对应用户信息
	public static String REDIS_MAP_KEY_USERID_USERINFO  = "user:userid:userinfo";
	// 所有功能
	public static String REDIS_MAP_KEY_FUNCTION_METADATASOURCE = "function:metadatasource";
	// 用户ID，对应用户功能
	public static String REDIS_MAP_KEY_USERID_FUNCTION = "user:userid:function";
}
